var uniqueKey = this._getUniqueKey();
this._storageLoader = new StorageLoader(this.dom, this._storageElem, uniqueKey);
this._storageLoader.loadStorage({ detectionComplete: (err, persistenceName, editedUTC, loadingFromPersistence) =>
this._storageDetectionComplete(err, persistenceName, editedUTC, loadingFromPersistence),
loadProgress: (totalFileCount, loadedFileCount, lastLoadedFileName) =>
this._storageLoadProgress(totalFileCount, loadedFileCount, lastLoadedFileName),
loadComplete: (err, byFullPath, domUpdater, persistenceUpdater) =>
this._storageLoaded(err, byFullPath, domUpdater, persistenceUpdater)
private _storageDetectionComplete(
loadingFromPersistence) { alert('Detection '+err.message); this._persistenceName = persistenceName;
this._editedUTC = editedUTC;
this._loadingFromPersistence = loadingFromPersistence;
this._layout.setProgressColor('goldenrod'); this._layout.setSmallProgressText(
(loadingFromPersistence ? persistenceName + ' to dom' : 'dom' + (persistenceName ? ' to ' + persistenceName : '')) +
(editedUTC ? ' edited on ' + new Date(editedUTC) : '') +
private _storageLoadProgress(
lastLoadedFileName: string) { this._layout.setProgressColor('green'); this._layout.setSmallProgressText('Loading "' + lastLoadedFileName + '" ' + loadedFileCount + ' of ' + totalFileCount + '...'); this._layout.setProgressRatio(
BootController.initialProgress + BootController.domLoadProgressAmount +
BootController.migrateProgressAmount * loadedFileCount / totalFileCount);
this._fileCount = loadedFileCount;
byFullPath: { [fullPath: string]: { [property: string]: string; }; }, domUpdater: storage.attached.UpdateStorage,
persistenceUpdater: storage.attached.UpdateStorage) { alert('Loading ' + err.message); var preciseFileCount = 0;
for (var k in byFullPath) if (byFullPath.hasOwnProperty(k)) { this._layout.setProgressColor('black'); this._layout.setSmallProgressText(
'Loaded ' + preciseFileCount + ' files from ' +
(this._loadingFromPersistence ? this._persistenceName + ' to dom' : 'dom' + (this._persistenceName ? ' to ' + this._persistenceName : '')) +
(this._editedUTC ? ' edited on ' + new Date(this._editedUTC) : '') + '.');
this._layout.setProgressRatio(
BootController.initialProgress + BootController.domLoadProgressAmount +